﻿namespace UnitTestInjector.Exceptions
{
    #region Usings

    using Localizations;
    using System;
    using System.Globalization;

    #endregion Usings

    public class DependencyNotResolvableException : Exception
    {
        public DependencyNotResolvableException(Type type)
            : base(GenerateExceptionMessage(type))
        {
        }

        private static string GenerateExceptionMessage(Type dependencyType)
        {
            if (dependencyType == null) throw new ArgumentNullException("dependencyType");

            return string.Format(CultureInfo.CurrentCulture, Strings.DependencyNotResolvableExceptionMessage,
                dependencyType.FullName);
        }
    }
}